<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/dpa/css/weui.css"/>
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/dpa/css/search.css"/>
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/weui-1.0.2/dist/style/weui.min.css"/>
    <link rel="stylesheet" href="__PUBLIC__/dpa/css/page.css" />
    <script type="text/javascript" src="__PUBLIC__/dpa/js/jquery-2.1.4.js"></script>
    <script type="text/javascript" src="__PUBLIC__/dpa/js/jquery-weui.js"></script>
    <title>自助查询结果</title>
</head>
<script>
    document.addEventListener('WeixinJSBridgeReady',
            function onBridgeReady(){
                WeixinJSBridge.call('hideOptionMenu');
            });
    function abc(){
        WeixinJSBridge.call('closeWindow');
    }
</script>
<body>
<foreach name="list" item="v">
<div class="weui_cells out-width">
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>证书编号</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.dpasum}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>状态</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.status}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>任务单号</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.gxsum}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>型号规格</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.xhtype}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>统一编号</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.norm}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>出厂编号</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.batch}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>检定校准单位</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.zlgrage}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>生产厂家</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.output}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>委托单位</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.requester}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>委托人</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.client}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>委托电话</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.tel}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>委托日期</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.wtsj|date='Y-m-d',###}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>计量日期</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.wcsj|date='Y-m-d',###}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>计量结果</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.end}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>计量员</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.assess}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>有效期至</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.remark}</div>
    </div>
    <!------------------------------交接数据开始------------------------------->
    <?php if($v['status'] == '已完成' ):  ?>
    <?php if($v['dpa'] == null): ?>
    <div class="weui_cell" >
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p style="color:red">该证书编号尚未完成交接</p>
        </div>
    </div>
    <?php else: ?>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>发放人</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.givename}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>发放时间</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.givetime|date='Y-m-d',###}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>发放地点</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.givelocation}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>接收人</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.getname}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>接收时间</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.gettime|date='Y-m-d',###}</div>
    </div>
    <div class="weui_cell">
        <div class="weui_cell_bd weui_cell_primary left-text">
            <p>接收地点</p>
        </div>
        <div class="weui_cell_ft right-text">{$v.getlocation}</div>
    </div>
    <?php endif; ?>
    <?php endif; ?>
</div>
</foreach>
<div style="margin-top:10px;font-size:14px;" id="page" class="green-black">{$page}</div>
<input type="hidden" name="openid" value="{$openid}">
<div style="margin-bottom:50px;"></div>
<div class="fix-bottom" >
    <a style="width:100%" href="javascript:;" class="weui_btn weui_btn_primary fix-bottom" >返回</a>
</div>
</body>
<script>
    $('#page a').click(function(){
        var url = $(this).attr('href');
        var newstr =  url.replace('//','/p/');
        $(this).attr('href',newstr);
    });
    $('.fix-bottom').click(function(){
        var openid = $('input[name=openid]').val();
        location.href = "__CONTROLLER__/exact/openid/"+openid;
    })
</script>
</html>
